home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
utils
/
gemfut15.lzh
/
AESUTRC4.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-08-26
|
1KB
|
43 lines
/**************************************************************************
*
* AESFAST PD utilties.
*
* Rectangle utilities 4...
* rc_gtov
* rc_vtog
*************************************************************************/
#include <gemfast.h>
/*-------------------------------------------------------------------------
* rc_gtov - Convert GRECT to VRECT.
*-----------------------------------------------------------------------*/
void
rc_gtov(pgrect, pvrect)
register GRECT *pgrect;
register VRECT *pvrect;
{
pvrect->v_x1 = pgrect->g_x;
pvrect->v_y1 = pgrect->g_y;
pvrect->v_x2 = pgrect->g_x + pgrect->g_w;
pvrect->v_y2 = pgrect->g_y + pgrect->g_h;
}
/*-------------------------------------------------------------------------
* rc_vtog - Convert VRECT to GRECT.
*-----------------------------------------------------------------------*/
void
rc_vtog(pvrect, pgrect)
register VRECT *pvrect;
register GRECT *pgrect;
{
pgrect->g_x = pvrect->v_x1;
pgrect->g_y = pvrect->v_y1;
pgrect->g_w = pvrect->v_x2 - pvrect->v_x1;
pgrect->g_h = pvrect->v_y2 - pvrect->v_y1;
}